<template>
	<view class="containerbox">
		<uv-navbar title="通知公告详情" auto-back placeholder />

		<scroll-view scroll-y class="containerbox">
			<view class="px-30 mt-20">
				<view class="border-bottom pb-30">
					<view class="title text-40">{{ info.title }}</view>
					<view class="time text-20 mt-15">{{ info.createdAt }}</view>
				</view>
				
				<view class="text-28 mt-20 centent">
					<mp-html :content="info.content" />
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script setup>

	import { ref } from 'vue'
	import { getMessageInfo } from '@/common/apis/other'
	import { onLoad } from "@dcloudio/uni-app"
	
	let info = ref({})
	let messageInfo = async id => info.value = await getMessageInfo({ id })
	
	onLoad(async opt => {
		await messageInfo(opt.id)
	})
	
</script>

<style>page{background-color: #fff}</style>
<style scoped lang="scss">
	.title{color: #333}
	.time{color: #b4b4b4}
	.centent{line-height: 48rpx}
</style>